package com.qxbb.report.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qxbb.report.bo.ChainOrderSalerBO;
import com.qxbb.report.bo.HeadQuartersSalersBO;
import com.qxbb.report.dto.ChainSalesDTO;
import com.qxbb.report.dto.ChainSalesOrderDTO;
import com.qxbb.report.dto.ChainSalesWeekDTO;
import com.qxbb.report.pojo.ChainSalesOrder;
import org.apache.ibatis.annotations.Mapper;


import java.util.List;

@Mapper
public interface ChainSalesOrderMapper extends BaseMapper<ChainSalesOrder> {

    /**
     * 查询连锁店销售详情
     *
     * @param
     * @return
     */
    ChainSalesDTO selectChainSaleOrder(ChainOrderSalerBO chainOrderSalerBO);

    /**
     * 查询所有连锁店信息
     * @param headQuartersSalersBO
     * @return
     */
    List<ChainSalesOrderDTO> selectHeadQuartersOrder(HeadQuartersSalersBO headQuartersSalersBO);

    /**
     * 连锁店自营这查询自己名下所有店铺销售报表信息
     * @param startTime
     * @param endTime
     * @param chainIds
     * @return
     */
    List<ChainSalesOrderDTO> selectOperatorAll(String startTime, String endTime, List<Integer> chainIds);

    /**
     * 没有经手人查询情况
     * @param chainOrderSalerBO
     * @return
     */
    ChainSalesDTO selectNoHandledbyOrder(ChainOrderSalerBO chainOrderSalerBO);

    /**
     * 查询店铺某年某月净售额
     * @param chainStore
     * @param startTime
     * @param endTime
     * @return
     */
    List<ChainSalesWeekDTO> selectNetAmount(Integer chainStore, String startTime, String endTime);

    /**
     * 查询单个店铺销售报表信息
     * @param startTime
     * @param endTime
     * @param chainId
     * @return
     */
    ChainSalesOrderDTO selectOperatorOne(String startTime, String endTime, Integer chainId);

    /**
     * 连锁店为空  --》月销售统计
     * @param chainList
     * @param startTime
     * @param endTime
     * @return
     */
    List<ChainSalesWeekDTO> selectAllNetAmount(List<Integer> chainList, String startTime, String endTime);

}
